<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>

<body>
  <button id="reload">重新加载方法</button>
  <button id="assign">跳转页面</button>
  <button id="replace">跳转页面 不产生历史记录</button>
  <script>
    var reload = document.getElementById("reload")
    reload.onclick = function () {
      // 1. location.reload()//重新加载页面
      location.reload()
    }
    //2 location.assign() 跳转页面
    var assign = document.getElementById("assign")
    assign.onclick = function () {
      location.assign("./02 dom介绍.html")
    }
    //3 location.replace() 跳转页面 不产生历史记录 用户无法返回
    var replace = document.getElementById("replace");
    replace.onclick = function () {
      location.replace("./02 dom介绍.html")
    }
  </script>
</body>

</html>